package com.ssm.dao;

import com.ssm.model.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IBookDao {
    List<Book> selectAllBook();
    List<Book> selectBookByName(String name);
    List<Book> selectBookByType(String type);
    List<Book> selectBookByAuthor(String author);

    Book selectBookByBook_id(String book_id);

    void addBook(Book book);

    void updateBook(Book book);

    void deleteBook(String book_id);

    void decreaseQuantity(@Param("book_id")String book_id, @Param("cnt")int cnt);
}
